package com.itheima.exception;

/**
 * Description: 业务异常
 *
 * @author codermao
 * @date 2023/11/8 14:47
 */
public class BusinessException extends RuntimeException{
    /*
     *   属性：
     *      code:状态码
     *      message：异常信息（在父类中）
     * */
    private Integer code;

    public BusinessException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public BusinessException(Integer code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
